﻿/******************************************************************************
* File description: ExperimentOperation.h
* Function: 实验相关公共方法
* Current Version: 1.0.0
* Author: 郑佰旺
* Date: 2025-07-1
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/

#ifndef EXPERIMENTOPERATION_H
#define EXPERIMENTOPERATION_H

#include <QObject>
#include <CommonHelper.h>
#include <Connect/UdpClient.h>
#include <QSqlDatabase>
#include <DbHelper.h>
#include <Experiment/ExperimentThread.h>
#include <CommCommand.h>
#include "logHelper/debugLog.h"
#include <Experiment/ExpCommonMethod.h>
#include <Connect/CpsUdpClient.h>

class ExperimentOperation: public QObject
{
    Q_OBJECT
public:
    ExperimentOperation();
    ~ExperimentOperation();

    Q_INVOKABLE void startExperiment();//启动实验
    Q_INVOKABLE void operationExperiment(int);//实验中操作 2停止,3暂停,4继续,5复位 6急停
    Q_INVOKABLE void stepOperatingSimulation(QString,QString,QList<QString>);
    Q_INVOKABLE QString checkExpRunningRule();

    Q_INVOKABLE QString checkConsumablesSyring(QString);
    Q_INVOKABLE void continueExperiment(int,int);

    Q_INVOKABLE void forcedStop();      // 强制停止
    Q_INVOKABLE void SaveConc(QString);
    Q_INVOKABLE bool errorContinueExp(int,int,int);
signals:
    void startDemoThread();

private:
    QStringList getWheelPosition(QString);

private:
    UdpClient *udpClient;
    CpsUdpClient *cpsUdpClient;
};

#endif // EXPERIMENTOPERATION_H
